package dao;

import java.util.List;

import javax.sql.DataSource;

import jdbc.ConnectionJavaDB;

/**
 * @author IBD, JMDSD
 *
 * @param <T>
 */
public abstract class DAO<T> {
	/**
	 * 
	 */
	public DataSource datasource = ConnectionJavaDB.getInstance();
	/**
	 * @param obj
	 * @return
	 */
	public abstract T create(T obj);
	/**
	 * @param obj
	 * @return
	 */
	public abstract T update(T obj);
	/**
	 * @param obj
	 */
	public abstract void delete(T obj);
	/**
	 * @param id
	 * @return
	 */
	public abstract T find(int id);
	/**
	 * 
	 * @return
	 */
	public abstract List<T> findAll();
}
